module.exports = function (req,res,next) {
	if(req.session.User && req.session.User.admin){
		return next();
	}
	else{
		var requiredAdminError =[{name: 'requiredAdmin', message: 'Tienes que ser un adminstrador'}]
		req.session.flash={
			err: requiredAdminError
		}
		res.redirect('/session/new');
		return;
	}
};